//
//  Buttonview.m
//  Village
//
//  Created by longrise on 2017/9/11.
//  Copyright © 2017年 程虎. All rights reserved.
//

#import "Buttonview.h"

@implementation Buttonview

- (instancetype)initWithFrame:(CGRect)frame{
    self=[super initWithFrame:frame];
    if (self) {
    }
    _province = [UIButton buttonWithType:UIButtonTypeSystem];
    _province.backgroundColor = [UIColor whiteColor];
    [_province.layer setBorderColor:[Util colorWithHexString:@"dadada"].CGColor];
    _province.layer.borderWidth = 0.5f*kScreenScaleX;//设置边框颜色
    [_province setTitle:@"请选择省" forState:UIControlStateNormal];
    _province.titleLabel.font = [UIFont systemFontOfSize:16*kScreenScaleX];
    [_province setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [self addSubview:_province];
    
    [_province mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mas_top).offset(15*kScreenScaleX);//使顶部与self.ScrollWebView的底部间距为0
        make.left.equalTo(self.mas_left).offset(10*kScreenScaleX);
        make.width.mas_equalTo(169*kScreenScaleX);;
        make.height.mas_equalTo(40*kScreenScaleY);
          }];
    
    _city = [UIButton buttonWithType:UIButtonTypeSystem];
    _city.backgroundColor = [UIColor whiteColor];
    [_city.layer setBorderColor:[Util colorWithHexString:@"dadada"].CGColor];
    _city.layer.borderWidth = 0.5f*kScreenScaleX;//设置边框颜色

    [_city setTitle:@"请选择市" forState:UIControlStateNormal];
    _city.titleLabel.font = [UIFont systemFontOfSize:16*kScreenScaleX];
    [_city setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [self addSubview:_city];
    [_city mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mas_top).offset(15*kScreenScaleX);//使顶部与self.ScrollWebView的底部间距为0
        make.left.equalTo(_province.mas_right).offset(10*kScreenScaleX);
        make.width.mas_equalTo(169*kScreenScaleX);;
        make.height.mas_equalTo(40*kScreenScaleY);
    }];
    _district = [UIButton buttonWithType:UIButtonTypeSystem];
    _district.backgroundColor = [UIColor whiteColor];
    [_district.layer setBorderColor:[Util colorWithHexString:@"dadada"].CGColor];
    _district.layer.borderWidth = 0.5f*kScreenScaleX;//设置边框颜色
    [_district setTitle:@"请选择区" forState:UIControlStateNormal];
    _district.titleLabel.font = [UIFont systemFontOfSize:16*kScreenScaleX];
    [_district setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [self addSubview:_district];
    [_district mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_province.mas_bottom).offset(10*kScreenScaleX);//使顶部与self.ScrollWebView的底部间距为0
        make.left.equalTo(self.mas_left).offset(10*kScreenScaleX);
        make.width.mas_equalTo(169*kScreenScaleX);;
        make.height.mas_equalTo(40*kScreenScaleY);
    }];
    _town = [UIButton buttonWithType:UIButtonTypeSystem];
    _town.backgroundColor = [UIColor whiteColor];
    [_town.layer setBorderColor:[Util colorWithHexString:@"dadada"].CGColor];
    _town.layer.borderWidth = 0.5f*kScreenScaleX;//设置边框颜色

    [_town setTitle:@"请选择镇,街道" forState:UIControlStateNormal];
    _town.titleLabel.font = [UIFont systemFontOfSize:16*kScreenScaleX];
    [_town setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [self addSubview:_town];
    [_town mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_city.mas_bottom).offset(10*kScreenScaleX);//使顶部与self.ScrollWebView的底部间距为0
        make.left.equalTo(_district.mas_right).offset(10*kScreenScaleX);
        make.width.mas_equalTo(169*kScreenScaleX);;
        make.height.mas_equalTo(40*kScreenScaleY);
    }];

    
    _village = [UIButton buttonWithType:UIButtonTypeSystem];
    _village.backgroundColor = [UIColor whiteColor];
    [_village.layer setBorderColor:[Util colorWithHexString:@"dadada"].CGColor];
    _village.layer.borderWidth = 0.5f*kScreenScaleX;//设置边框颜色

    [_village setTitle:@"请选择村,居委会" forState:UIControlStateNormal];
    _village.titleLabel.font = [UIFont systemFontOfSize:16*kScreenScaleX];
    [_village setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [self addSubview:_village];
    
    [_village mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_town.mas_bottom).offset(10*kScreenScaleX);//使顶部与self.ScrollWebView的底部间距为0
        make.left.equalTo(self.mas_left).offset(10*kScreenScaleX);
        make.width.mas_equalTo(345*kScreenScaleX);;
        make.height.mas_equalTo(40*kScreenScaleY);
    }];


    
    
    {
        return self;
    }
    
    
    
}

@end
